package com.igs.muziapp.view;

import java.lang.reflect.Array;

import com.igs.muziapp.R;

import android.content.Context;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;

public class Playdata_table {
	// private View view = null;
	private Context context;
	// private TableLayout tablelayout;
	private LinearLayout layout = null;

	public Playdata_table(Context context, String ItemName, String[][] Itemdata) {
		this.context = context;
		ViewGroup.LayoutParams param = new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);

		layout = new LinearLayout(context);
		layout.setOrientation(LinearLayout.VERTICAL);
		layout.setLayoutParams(param);

		// 標提
		Playdata_row0 row = new Playdata_row0(context);
		row.setItemNameString(ItemName);
		row.setItemValueShow(false);
		row.setBackgroundColor(0xffeaebef);
		layout.addView(row.getView());

		// Log.d("playdata", "data:" + strdata.length);
		for (int i = 0, max = Itemdata.length; i < max; i++) {
			Playdata_row0 vrow = new Playdata_row0(context);
			vrow.setItemNameString(Itemdata[i][0]);
			vrow.setItemValueString(Itemdata[i][1]);
			layout.addView(vrow.getView());

		}

	}

	public View getView() {
		return layout;
	}
}
